package com.xx;

import com.xx.condition.DemoCondition;
import com.xx.pojo.Bar;
import com.xx.pojo.Foo;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

@Configuration
public class DemoConfig {


    @Bean
    public Foo foo() {
        return new Foo();
    }

    @Conditional(DemoCondition.class)
    @Bean
    public Bar bar() {
        return new Bar();
    }
}
